import request from "@/utils/request";
export const userPrefix = "/sys/user/notification/";

export function getNotifications(params) {
  return request({
    url: userPrefix,
    method: "get",
    params,
  });
}

export function markAsRead() {
  return request({
    url: userPrefix + `/mark_read/`,
    method: "post",
  });
}

export function markAllAsRead() {
  return request({
    url: userPrefix + `/batch_read/`,
    method: "post",
  });
}

export function getUnreadCount() {
  return request({
    url: userPrefix + "/unread_count/",
    method: "get",
  });
}
